////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation.  All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <tinyhal.h>

/**********************************************************************
**
** Function: CustomHeapLocation retrives the buffer to be used for Simple Heap allocations
** PK customers need to implement this function if they want to use it with Simple Heap.
** This function returns the buffer location and the size of the buffer.
** inline void HAL_Init_Custom_Heap() ( in tynihal.h )calls CustomHeapLocation to retrive 
** custom heap location and initialize custom heap.
**
** Arguments: [BaseAddress] - Reference to pointer to buffer for custom heap. Filled by function
**            [SizeInBytes] - Reference to varialbe that receives size of the buffer.
**********************************************************************/
#define SIMPLE_HEAP_SIZE	(0x1024*256)	
static UINT8 simple_heap_for_hal_use[SIMPLE_HEAP_SIZE];	

void CustomHeapLocation( UINT8*& BaseAddress, UINT32& SizeInBytes )

{
    NATIVE_PROFILE_PAL_HEAP();

    BaseAddress = (UINT8*) simple_heap_for_hal_use;
    SizeInBytes = (UINT32) SIMPLE_HEAP_SIZE;
   
}

